Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@maggioli-design-system/styles
Advanced tools
This module contains SCSS and CSS styles used by Maggioli Design System, it also makes available a Tailwind config based on Maggioli design tokens.
These are the CSS and Tailwind styles used by components libraries of Magma Design System to use the palette generated by @maggioli-design-system/design-tokens
.
Install the component via npm
by running the following command:
npm i @maggioli-design-system/styles
This package works also with yarn:
yarn add @maggioli-design-system/styles
The first part to be included are the design tokens, like color palette and typography, that are used by the components.
If you use tailwind or web components, you need to import rgb format of colors:
import '@maggioli-design-system/styles/dist/css/colors-rgb-tones.css';
import '@maggioli-design-system/styles/dist/css/colors-rgb-status.css';
import '@maggioli-design-system/styles/dist/css/colors-rgb-label.css';
import '@maggioli-design-system/styles/dist/css/colors-rgb-brand.css';
You need to import colors because web components and our tailwind config works with our palette, which are custom properties in rgb format (rr, gg, bb).
If for some reason you need to use colors outside tailwind:
.selector {
color: rgb(var(--tone-neutral-01));
}
If you need just the hex format of colors, you can import them like this:
import '@maggioli-design-system/styles/dist/css/colors-hex-tones.css';
import '@maggioli-design-system/styles/dist/css/colors-hex-status.css';
import '@maggioli-design-system/styles/dist/css/colors-hex-label.css';
import '@maggioli-design-system/styles/dist/css/colors-hex-brand.css';
Then you can use them like this:
.selector {
color: var(--tone-neutral-01);
}
our color palette already supports dark mode, either according to your computer settings, or with manual support:
Just add the dark-mode
class to the html
tag:
<html class="dark-mode">
Just add the system-mode
class to the html
tag:
<html class="system-mode">
There are other practices to handle dark mode, check how tailwind handle dark mode, or how is handled by next-themes.
You can use styles with tailwindcss config, palette colors and the rest of it's Design Tokens. There are various ways to use it, check out tailwindcss documentation.
To extend the default tailwind config:
module.exports = {
content: [
'./src/**/*.{ts,tsx}',
],
important: false,
presets: [
require('@maggioli-design-system/styles'),
],
}
Use @fontsource
fonts, which are up to date with Google fonts, styles used in Magma Design System are:
Importing fonts in TypeScript:
```ts
import '@fontsource/karla/400.css'
import '@fontsource/karla/700.css'
import '@fontsource/merriweather/400.css'
import '@fontsource/merriweather/700.css'
import '@fontsource/roboto-mono/400.css'
import '@fontsource/roboto/500.css'
import '@fontsource/roboto/700.css'
import '@fontsource/roboto/900.css'
Importing fonts in CSS:
@import '@fontsource/karla/400.css';
@import '@fontsource/karla/700.css';
@import '@fontsource/merriweather/400.css';
@import '@fontsource/merriweather/700.css';
@import '@fontsource/roboto-mono/400.css';
@import '@fontsource/roboto/500.css';
@import '@fontsource/roboto/700.css';
@import '@fontsource/roboto/900.css';
Fontsource supports variable fonts.
The dist
folder contains the following files:
Folder | For | File name |
---|---|---|
css | both | globals.css |
css | both | reset.css |
css | plain css | base.css |
css | plain css | colors-hex-*.css |
css | plain css | typography.css |
css | tailwind or web components | colors-rgb-*.css |
tailwind | tailwind | base.css |
tailwind | tailwind components | components.css |
tailwind | tailwind typography components | typography.css |
FAQs
This module contains SCSS and CSS styles used by Maggioli Design System, it also makes available a Tailwind config based on Maggioli design tokens.
The npm package @maggioli-design-system/styles receives a total of 2,300 weekly downloads. As such, @maggioli-design-system/styles popularity was classified as popular.
We found that @maggioli-design-system/styles demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.